import {
	Entity,
	PrimaryGeneratedColumn,
	Column,
	CreateDateColumn
} from 'typeorm'

@Entity()
export class User {
	@PrimaryGeneratedColumn()
	id: number

	@Column({ type: 'text' })
	username: string

	@Column({ type: 'text' })
	password: string

	@Column({ type: 'text', default: 'xxx' })
	nickname: string

	@Column({ type: 'int', default: 18 })
	age: string

	@Column({ type: 'int', default: 0 })
	gender: string

	@CreateDateColumn()
	user_date: Date

	@Column({ type: 'text', default: 'https://img.yzcdn.cn/vant/apple-5.jpg' })
	img: string
}
